#include <bits/stdc++.h>

#define int long long
#define endl "\n"

using namespace std;

signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);

    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);

    int n;
    cin>>n;
    vector<int> r(n);
    for(int i=0; i<n; ++i)cin>>r[i];
    sort(r.begin(),r.end());

    multiset<int,greater<int>> stk;
    for(int i=0; i<n; ++i)
    {
        if (stk.empty())
        {
            stk.insert(r[i]);
        }
        else
        {
            auto it=stk.upper_bound(r[i]);
            if (it!=stk.end())stk.erase(it);
            stk.insert(r[i]);
        }
    }

    cout<<stk.size()<<endl;

    return 0;
}

